
********************************************************************************
** Replication file for Aidt and Leon (2020), "The role of structural factors **
** and diffusion in social unrest: evidence from the Swing riots              **
********************************************************************************

clear
clear matrix
clear mata
set maxvar 32000

* Set directory (update as appropriate)
cd "C:\Users\k1466170\Documents\Great Reform riots\UK riots\Data\Parish Names\Hobsbawm\replication material - BJPolS"
sysdir set PERSONAL "C:\Users\k1466170\Documents\ado"
sysdir set PLUS "C:\Users\k1466170\Documents\ado"


use riotscrosssection.dta
set more off



			***********************************************************
			* Cross-section tables for the main text - Row Normalised *
			***********************************************************


* Table 1, column 2 (Poisson)
xi: ppml allriotsX allriots_nearRN cereal ln_rural enclosure ln_wealth ln_males ln_total_of_person ln_trade ln_professionals ln_petitions news_10 ln_garr_min_dis Dpolice10 i.county, cluster(input_fid) technique(irls)

* Table A2: Correlations matrix
corrtex cereal ln_rural enclosure ln_wealth ln_males ln_total_of_person ln_trade ln_professionals ln_petitions news_10 ln_garr_min_dis Dpolice10, file(corr_cross.tex)

* Table A3: Summary stats
outreg2 using A3, tex(frag) auto(2) lab replace sum(log) drop(_Icounty* input_fid) sortvar(allriotsX cereal ln_rural enclosure ln_wealth ln_males ln_total_of_person ln_trade ln_professionals ln_petitions news_10 ln_garr_min_dis Dpolice10 allriots_nearRN)






